#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<string.h>

void reversestring(char* p,int len) 
{
    int left = 0, right = len - 1;
    char temp;
    while (left < right)
    {
        temp = *(p + left);
        *(p + left) = *(p + right);
        *(p + right) = temp;
        left++;
        right--;
    }
}
int main() {
    char a[10000];
    gets_s(a);
    int len = strlen(a);
    reversestring(a, len);
    puts(a);
    return 0;
}